package com.nineclock.system;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication //也可以扫描包扫描的包: 当前包及其子包
@EnableDiscoveryClient
@MapperScan(basePackages = "com.nineclock.system.mapper") //mybatisPlus包扫描
@ServletComponentScan(basePackages ="com.nineclock.common.filter") //扫描filter所在包
public class NcSystemApplication {
    public static void main(String[] args) {

        SpringApplication.run(NcSystemApplication.class, args);
    }


    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
